package com.five.welcome.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.five.welcome.entity.Goods;
import com.five.welcome.dao.GoodsMapper;
import com.five.welcome.service.GoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author ywt
 * @since 2024-07-12
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {

    @Autowired
    private GoodsMapper goodsMapper;

    //查询所有物资
    @Override
    public List<Goods> getAllGoods() {
        QueryWrapper<Goods> queryWrapper=new QueryWrapper<>();
        queryWrapper.select("*");
        return goodsMapper.selectList(queryWrapper);
    }
}
